interface Bird {
  fly(): void;
  layEggs(): void;
}
interface Fish {
  swim(): void;
  layEggs(): void;
}
declare function getSmallPetTo1(): Fish | Bird
let petTo1 = getSmallPetTo1()
petTo1.layEggs();